home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20010306-20010921
/
000246_fdc@watsun.cc.columbia.edu_Thu Jul 5 17:43:36 EDT 2001.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
5KB
|
127 lines
Article: 12571 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Any way to alter Kermit "quit" so I don't have to "kill?"
Date: 5 Jul 2001 21:43:52 GMT
Organization: Columbia University
Lines: 110
Message-ID: <9i2n2o$dgn$1@newsmaster.cc.columbia.edu>
References: <h_417.5247$oa1.534611@newsread1.prod.itd.earthlink.net>
NNTP-Posting-Host: watsun.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 994369432 13847 128.59.39.2 (5 Jul 2001 21:43:52 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 5 Jul 2001 21:43:52 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12571
In article <h_417.5247$oa1.534611@newsread1.prod.itd.earthlink.net>,
Keith Doyle <keithuse@synco_pator.com> wrote:
: I've been using a dialing program under Linux that will connect
: to a shell account and do a bunch of intelligent stuff including
: transfer files. I had been using Zmodem via lrz/lsz with success
: for a long time, but I'm finding it's just not working anymore,
: due to the fact that I can only connect to the target machine now
: via some kind of POP service that uses telnet and is none too
: transparent. It may even be 7 bit, it's not clear, and I have
: no control over it.
:
: At any rate, I found that I could manually use kermit to perform
: a successful transfer. So I figured the obvious thing to do was to
: replace my lrz/lsz logic with C-kermit equivalents. This worked
: fine but with one problem-- after the transfer finished, C-kermit
: does something that causes a disconnect. So, I did some research
: on deja/google and found some references to some mention of the
: subject in a documentation file somewhere:
:
: >Many people want to be able to make a dialout connection with UNIX
: >C-Kermit, but then use some other software on the connection that C-Kermit
: >made. They quickly find that when they exit from C-Kermit, that the
: >connection is gone before they can start the other application.
: >
: >It is a fundamental property of UNIX that when a process exits, then every
: >file that was opened by that process is automatically closed by UNIX.
: >Closing a terminal device (such as a dialout tty device) hangs it up.
: >There is nothing the process can do about it.
: >
: >However, many workarounds are possible. Here are just a few:
: >
: > . Read about the REDIRECT command in the ckcker.upd file.
: >
: > . Find out the file descriptor of the open device (it is given by
: > C-Kermit's \v(ttyfd) variable) and then run ("!") your other program
: > from the C-Kermit prompt, feeding it the file descriptor, e.g. through
: > shell redirection or a command line option (the method depends on the
: > other program, the capabilities of the shell, etc).
: >
: > . After Kermit makes the connection, type "show comm" to find out the
: > filename of the lock file. Then suspend Kermit, then delete the lock
: > file, then start the other program and tell it to open the same tty
: > device.
:
:
: Now my original approach used lrz something like the following:
:
: lrz </dev/modem >/dev/modem
:
: Since this doesn't hang up the line, I presume that the issue is NOT
: "close" of the device.
:
Right -- it uses the open stdin/stdout file descriptors, which have
been redirected from/to the modem. Since the lrz program uses stdin/out,
it never opens or closes it.
: So I tried serveral things. I noticed that it is possible to pass in
: an open file descriptor and have kermit use that. But, I gathered
: you can't just do:
:
: kermit -r -i -l 0 </dev/modem
:
: As this is only open for input, and kermit is going to need bidirectional
: I/O on the FD.
:
Did you try it?
: So lastly, I figured ok, let's see if it really is the close of the
: device or something *specific* kermit is doing on exit. I manually
: invoked kermit so that it wouldn't exit, and instead of doing a "quit"
: after the transfer, I switched to another window and did a kill -9
: on the kermit process. Voila! no disconnect occurred.
:
Because you killed Kermit and it couldn't close the device. Meanwhile
another process had it open, right? That's why you didn't carrier drop
or whatever.
: So, I've since implemented a solution to the problem which entails
: a kermit script that does something like this:
: set modem none
: set line /dev/modem
: set file type bin
: receive
: !/tmp/killkerm
:
:
: And invokes kermit like this:
:
: echo "kill -9 $$" >/tmp/killkerm
: chmod a+x /tmp/killkerm
: exec kermit -y kermitscript
:
: And it works like a choim. However, it is a major kludge.
:
Yes indeed.
: I'm using
: it because it works, but does anyone know how I can get kermit to NOT
: do whatever it is doing to the device before it exits so I don't have
: use kill? Perhaps it's doing some kind of rude stty/ioctl that's
: causing it?
:
Try the first method (-l 0) and see what happens. If that doesn't work,
what I'd recommend is to let Kermit handle everything -- dialing, terminal
session, and file transfer. That's what it's designed for.
In any case, let us know what happens and we'll see what to do next.
- Frank